package cn.bxshey.webModule;

import cn.bxshey.commonModule.result.Result;
import cn.bxshey.serviceModule.service.WebSocketService;
import cn.bxshey.webModule.base.BaseController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @作者：不想说话而已
 * @Date：2024/3/10 1:34
 * 消息控制层
 */

@RestController
@RequestMapping("/message")
public class MessageController extends BaseController {

    @Resource
    WebSocketService webSocketService;

    @GetMapping("/all")
    public Result<String> all(){
        System.err.println("已执行消息发送");
        webSocketService.sendMsg();
        return Result.success("");
    }
}
